package com.chs.recoginition.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.chs.recoginition.pojo.AndroidAppInfo;
import com.chs.recoginition.vo.AndroidAppDownloadVo;
import com.chs.recoginition.vo.AndroidAppSaveVo;

import javax.servlet.http.HttpServletResponse;
import java.io.FileNotFoundException;
import java.io.IOException;

/**
 * @Author CHS
 * @Date 2022/8/25 18:53
 * @Version 1.0
 **/
public interface AndroidAppInfoService extends IService<AndroidAppInfo> {

    /**
     * 上传apk 文件
     *
     * @param response 响应
     * @param saveVo   上传的文件以及描述信息
     */
    void uploadApp(HttpServletResponse response, AndroidAppSaveVo saveVo) throws IOException;

    void downloadApp(HttpServletResponse response,String appName, Integer version) throws FileNotFoundException;

    /**
     * 查询最新app 的下载信息
     * @param appName app 名称
     * @return 下载信息
     */
    AndroidAppDownloadVo selectLastVersion(String appName);
}
